package com.cskaoyan.catmall.model.vo.issue;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 创建日期: 2022/01/08 11:39
 *
 * @author WangZhe
 * 备注:
 */

@NoArgsConstructor
@Data
public class IssueListVo {

    @JsonProperty("total")
    private Integer total;

    @JsonProperty("pages")
    private Integer pages;

    @JsonProperty("limit")
    private Integer limit;

    @JsonProperty("page")
    private Integer page;

    @JsonProperty("list")
    private List<IssueVo> list;

    public static IssueListVo data(long total, Integer pages, Integer limit, Integer page, List list) {
        IssueListVo vo = new IssueListVo();
        vo.setTotal((int) total);
        vo.setPages(pages);
        vo.setPage(page);
        vo.setLimit(limit);
        vo.setList(list);
        return vo;
    }
}
